create  table  jms_dm.dm_site_wrong_detail_dt
(
    date_time             date comment ''日期'',
    waybill_no           varchar(100) comment ''运单号'',
    taking_site_code     varchar(500) comment ''揽收网点code'',
    taking_site_name      varchar(500) comment ''揽收网点name'',
    taking_scantime      datetime comment ''揽收时间'',
    agent_code             varchar(500) comment ''代理区code'',
    agent_name       varchar(500) comment ''代理区name'',
    fran_code            varchar(500) comment ''加盟商编码'',
    fran_name             varchar(500) comment ''加盟商名称'',
    first_center_network_code          varchar(500) comment ''始发中心code'',
    first_center_network_name   varchar(500) comment ''始发中心name'',
    end_center_network_code varchar(500) comment ''目的中心code'',
    end_center_network_name varchar(500) comment ''目的中心name'',
    must_center_name    varchar(500) comment ''应交件中心'',
   is_wrong bigint comment ''是否错分,1是，0否''

)ENGINE = OLAP
DUPLICATE KEY( date_time,waybill_no)
COMMENT "网点错分明细"
PARTITION BY RANGE(date_time)
(START ("2023-03-01") END ("2023-04-25") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(waybill_no,taking_site_code,agent_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
)
;